register related bug fixed