added handler for F5 (refresh) close