fix bugs register