Draw polylines correctly