Correct cppcheck issues