Error handling corrected.