Corrected bug with complex nested references
Merge pull request #3 from antolikjan/master

Corrected bug with complex nested references