cleanup and restart