Fixed many editor bugs