fix miner bugs
Merge branch 'devel'