Fixed up conditional running of register