Fix error when comparing 2 strings lexicographically