fix some editor bugs