Fix equality checks