Fix crappy lines function