fixing a bug in checking string equality