fixing garbage collector issue for undock editor