Fix syntax error in run_task