Fix comparison bug