Fixed some TextEdit-caused errors.