Minor JS bug fix