fixed sed_edit() implementation.