window cleanup fixed