fix crash with circular objects
Merge pull request #39 from automategreen/master

fix crash with circular objects