Merge "Fix fork deadlock issues." into main