Fixed saving an image to work with layers.

Fixed a pasting issue in the locker.