fixed bug with codemirror not updating