cleanup for restart