fix code editor bug