register bug fix