fixed text-editor bug