Crash in ToLowercase()

It just fixes some very old code.