cppcheck fixes (issue #99)