Fix stop and restart

Change-Id: I70bb70ea6dcf043a81edc453e8a09f7849f0cbf1