fixed minor js bug