fixed compareStrings bug