Fix PolyResample, TooClose and Sample