Finally fixed the threading issues and added methods to detect and load already opened desktops.