Fixed bad refresh call when use embedded window