Preview JS fix