Fixed a bug where a png was being copied as a jpg