Draw BitmapData error on loop

Hi everyone!

I have been pulling my hair out on this one for too long. I have a web banner that uses Erik Hallander’s Pixelator Class. Everything works fine when the timeline plays just once, but as soon as it loops I get error:

**ArgumentError: Error #2015: Invalid BitmapData.
**
I have tried removeChild, removeEventListener, nulling the variables involved, disposing of the BitmapData. I also tried some conditional statements depending on the loop but no success. The actual class code is beyond my experience.

What am I missing? Thanks for your help.