You are depending on flightmode being the last channel forever, don't know if this is a good aproach, probably better to keep it as it was and "continue" when x==...FLIGHTMODE