Fixing bug where container disposal closed browser window and caused exc...

...eption when trying to reclose stopping the webserver from shutting down