fixed small bug in in_polygon