Text formatter bug fix