fix #634 instances of ToLower that needed to be ToLowerInvariant()