close browser on end fix