fixing restart problems