Minor changes to restart hook code