fixed bad getImageData call. fixed image data duplication.