Fixing bug with adding task.