Fixed minor javascript issue that was preventing Preview from working