fix little bug in restarting