fix db_retract