make config work and also autoset the register flag