In a couple of string comparisons I was using IF string1 = string2, which is case insensitive, so you couldn't change just the case of a value. Changed to IF string1 == string2 to make the comparison case sensitive.