Fix fork case.

Closes issue #3 .