fixed refresh issue using flash