This looks wrong - why would you erase text during process?