Fixed copy/paste crashing the IDE because of unremoved event listeners