fix the register problem