Fixed a few cppcheck messages