fixed type error in equality test