fix for issue #58

Closes the screenshot window and the chat window when not connected to a server. Fixes issue #58