Fixed issues with string comparisons