Fixed editor bugs