fix restart command bugs