fix register js bug