Fixed bug in autoFork