Fixed forking logic