Fix to options.error callback wrapping.