Fix exiting task