fixed returnws
added load prevWorkspace if it exists
made initWorkspace synchronous