fixed a bug in mineCycle