Fixed some cppcheck warnning