Fix equality test to use && instead of ||.