miner fix & cleanup