error fix in polyline read function