MIdrum lock up because of GateOff

L336: changed upperlimit to 3