fixed segmentation fault when line if filled