Reimplemented task_free