Fix circular references problem
Merge pull request #7 from Warry/wip/fix-6

Fix circular references problem #6