remove extra end line