Improved reported issues by the static anylizer cppcheck