[fix] bug that causes deletion of agent when deleting agent relation