Client: 1. fixed bugs in the previous version. (crashed when texteditor
initializing)