fix circular struct error handling
Merge pull request #29 from juliangruber/fix/circular-ref

fix circular struct error handling