Fix coordinate order in polygon test