Fix database errors.