Fixed parsing of task and updated the task variables.