minor js bug fix