Fixed memory leak from copyPixels()