Made a little change on updateTask function.