Equality logic fix