fixed bug with current regs and next regs