Fix deletion bug

The number of chars to delete was used as the number of bytes to delete.