Using setMask dynamically cause displaying problem

I have a movieclip and there is a “mask movieclip” within it.

In my code, I need to switch between mask and no mask to add other movieclip by drag and drop:

themovieclip.setMask(null);
themovieclip.setMask(themovieclip.mask_mc);

Problem: The mask works but it looks very ugly. If I refresh my flash player (e.g. resize or minimize/restore the player), the mask will look ok.

I assume that it is graphic-drawing/displaying problem. Does anyone know how to solve it?

Thanks!!!