fix bug when comparing strings