fixed error when codemirror was unable to initialize.