Core/Misc: Fix some static analysis issues