Proper stopping and restarting implemented