fix letter comparison bug