Fixed cppcheck error with a workaround.