core: fix warnings in error