Fixes to text edit