js bug fixed