Text editor. Some bugfix