Deletes extra lines at end