fix browser crash (fixes #10461)