PasteImage: Safe solution for #608.
Code: Formatting.
Merge pull request #697 from am11/master

PasteImage: Safe solution for #608