Added call to onError