a few bug fixes for section editor and codeviewer.