fixing restart hook