Fix problem with pasteboard reported at #314
Merge remote-tracking branch 'upstream/master'