Resolve window leakage