MODE-1832: Fix bug with workspace detection

Fixed bug with detection of workspace name