Fix bug where copy-and-paste did not work (broken by 52e2410)