Handle upper case detection and restoration.