Minor JS fix in preview