[bug 882558] Corrected error handling