put back onbeforeunload callback