fixed window.onbeforeunload