Fix a bug where Save as PNG wasn't saving the file correctly