fix bug after renaming agreements_id