Fixed some bugs...

The main window, will never be visible, when the user unchecked 'Show system tray' and checked 'Start in tray'.
EDIT: Furthermore the window will not close, even if it was visible.