Added done() call when task is complete.