Error handling improvement.