delete invalid lines