fix window  fresh issue