I am going to assume that by saying you were trying to close the program you are playing on the standalone client. There a lot of issues with the client currently, so I suggest playing the game in-browser for the time being. From what I remember the two browsers that still support NPAPI (Plugin for Unity Webplayer) are Safari and Pale Moon. You can get other browsers to run it if you download an older version and turn off auto updates.
If you still have issues even with the browser port of the game, I highly suggest sending in a support ticket on support.deadfrontier.com and explain the issue you're having there. They have much more experience with technical support than I do. I am only a wiki admin after all.