misc. fixes for text editing