fixed eqaulity check