Fix window destruction
Merge pull request #76 from Chronial/fix-winclose

Fix window destruction