Fix register allocation