Patches to fix 2 Segmentation faults and the restart machinery