fixed crash on invalid lines