Fixed issue so polylines are now plotted correctly