Fix workspace switching

- Fix AtomicBoolean condition
- hide the main panel before unloading it (unload faster).
- Do not show already loaded workspace on the dialog.