Fix crash when an error object is called back.