fix errors bubbling up to the browser