exchange for() and if() order in the MT_FRAME case