test register bug fix