avoid close current window