fix register problem