improved findworkspace detection, minor changes