Fixed bugs with polygon and polyline