fixes the if test (regs again)