Hi, The reason for the main macro starts running after the command Gate could be that Gate runs the file prerunGate.mac. Probably you have the line /control/execute mainmacro.mac in that file. You could, of course, comment that line if you want to avoid that the main macro starts running. Best regards Ernesto