fix toupper(c) on a already uppercase char and tolower(c) on an