fixed a register allocation issue