fixed bug in extension identification in image copy/paste