fixed a cppcheck warning