Fix register problem