made browser util not hang if the browser was not open before