bugfix in register allocation