remove leftover end