Fixed equality check