Remove trailing tasks