Added a try/catch to protect against IE9 error. fixes #519