move flag out of task