core: Fix some warnings