Clean up task registration