Error handling fix.