Stop modal loop when the icon window is closed. Fixes #32.