Fix fork case.
Merge pull request #15 from maclyn/master

Fix fork case.