minor fixes from cppcheck