fixed some bugs on the TextArea