Fixing orphan handling
Merge pull request #6 from CoderLisa/orphanfix

Fixing orphan handling