fix the effective switching of workspace