Fixed contains method of the class polygon