Improve cancel task