Doesnt error when I close windows anymore