Some fixes in the restart process