correct equality check