remove blank end lines