Solve cppcheck issues