editor switching is working properly now.