added line size < 1 check