Fixed some editor bugs