fix comparison bug and string compare bug