Fixed the Ramer-Douglas-Peucker simplify polyline implementation