Modified callback error handling.