remove extra end