issue 817 polylines works again

main bug here