fixed register js bug