Core/Misc: Fixed some issues found by Coverity Scan