Resolve circular references