Fix error on [onError] callback.