Fixed a fatal miner bug