String comparison bug fix