fix extract_item_id for entities