fix character deletion