Fixed fork() in native code