Fixed bugs in mining section