Core/Misc: Fixed some issues found by Coverity Scan
Fixed compile