fix default onError behavior