speed up error handling