minor js bug fixed