DB error handling fix.