Make the error case work more reliably in IE8-10
Merge pull request #57 from jorupp/master

Make the error case work more reliably in IE8-10