Error handling improved.