fixed register problem