Small js bug fix