fixed window unload double dispose bug