Modify some code about polygon/polyline