Make "Restart" work properly