Fixes crash when opening and closing browsers from main menu repeatedly.