Bug fix for finding linked entities