Fix errors of Polyline, but still not able to work