some fixes related to codemirror