fix segfault #19 in copy/modify