Fix sorting and only draw one line per line segment.
Fix sorting and drawing in Fast.java as well.