End task on phantom exit