re-add Colin's attach pasted files commit, with the necessary fix