remove extra end block