register allocation fixes