Minor JS fixes