a little cleanup using cppcheck