Fixed bug where terminal was not updating after deleting characters