Fixed a deadlock in the abstracttask