Make the error case work more reliably in IE8-10