fixed cannot create empty polyline error