Error-handling fix.