Fixes from cppcheck