Removed unnecessary cleanup in window guard