fixed fork() so that it actually works
and doesn't bring down the entire system