fix a bug 'dispose not done' in editor