Move message outside cycle