fix thumbnail preview when pasting