Fix circular references