Bugfix: Program was leaving itself running when the window was closed.