another small improvement to parent detection
Merge pull request #51 from raffazizzi/master

another small improvement to parent detection