some code changes in Editor