rectify some register bug