Ensure that Miner is stopped before restarting