Fixing weird comparison bug