Core/Misc: Fixed some more issues found by static code analysis tools.