fixes a bug when comparing strings