Added reference equality check.