Fix the onError handler.