tolower c++ code bugfix