Make the browser-out-of-scope function work correctly.