I have same issue. This ******* bug disturbs me a lot. It is a bug of AOSP like CM7 and MIUI and I still have not found the way to fix it. In fact, you can try another rom except cyanogen, but if you still love miui, don't turn off screen when you are downloading something.