Fix a few cppcheck findings