This fixes the bugs that existed in the forking logic