fix close button not closing in distribution (fixes #26)