Fixed crash on close when browser is not initialized