Core/Misc: Fix coverity analysis issues