fix db_api bug