Fixed error killing miners when mining is stopped