Fixes a bug.
Marks as dirty if text is changed.