fix not setting currentWindow to null after closing window.

fixes #106