Fixes a equality check that was backwards