Fixed the parent reference function
Merge pull request #7 from yosssi/fix-parent-reference

Fixed the parent reference function