Fix order of operands in popping operation in restoreRegs