Fix re-register problem