Fix callback error passing.

When an error occurs when using a callback, the error argument ends up being set to `true` instead of the actual error message. This pull request fixes that.