fixed erreoneous binding set to window close event listener