Fixed issues found by cppcheck.