Fix comparison operator bug