added cancel_task for dispatcher