Fix editor bugs