increment waitgroup before goroutine starts
fix error when miner is already shutdown