Changed bag manipulation to work for entity pairs with multiple relation labels