CodeMirror bugs fixed