I'm not sure about a permanent fix, but what you can do is select the troublesome coding then hit CTRL+K followed by CTRL+F, so in order..
CTRL + K, F
This will auto format the coding (and make it the proper case).
If this doesn't work then it might be an auto-format issue/setting