Fix issue with entity reference moved to core