Fix problems for CodeEditor