diff --git a/session/src/SoundTriggerEngineCapi.cpp b/session/src/SoundTriggerEngineCapi.cpp
index 4ae520f..6ffa7f4 100644
--- a/session/src/SoundTriggerEngineCapi.cpp
+++ b/session/src/SoundTriggerEngineCapi.cpp
@@ -310,6 +310,7 @@
             goto exit;
         }
 
+        det_conf_score_ = result_cfg_ptr->best_confidence;
         if (result_cfg_ptr->is_detected) {
             exit_buffering_ = true;
             detection_state_ = KEYWORD_DETECTION_SUCCESS;
@@ -317,15 +318,16 @@
                                    buffer_start_, &start_idx);
             __builtin_add_overflow(result_cfg_ptr->end_position * CNN_FRAME_SIZE,
                                    buffer_start_, &end_idx);
+            vui_intf_->SetSecondStageDetLevels(stream_handle_,
+                engine_type_, det_conf_score_);
             PAL_INFO(LOG_TAG, "KW Second Stage Detected, start index %zu, end index %zu",
                 start_idx, end_idx);
         } else if (bytes_processed_ >= buffer_end_ - buffer_start_) {
             detection_state_ = KEYWORD_DETECTION_REJECT;
+            vui_intf_->SetSecondStageDetLevels(stream_handle_,
+                engine_type_, det_conf_score_);
             PAL_INFO(LOG_TAG, "KW Second Stage rejected");
         }
-        det_conf_score_ = result_cfg_ptr->best_confidence;
-        vui_intf_->SetSecondStageDetLevels(stream_handle_,
-            engine_type_, det_conf_score_);
         PAL_INFO(LOG_TAG, "KW second stage conf level %d", det_conf_score_);
 
         if (!first_buffer_processed) {
@@ -586,17 +588,19 @@
             goto exit;
         }
 
+        det_conf_score_ = (int32_t)result_cfg_ptr->final_user_score;
         if (result_cfg_ptr->is_detected) {
             exit_buffering_ = true;
             detection_state_ = USER_VERIFICATION_SUCCESS;
+            vui_intf_->SetSecondStageDetLevels(stream_handle_,
+                engine_type_, det_conf_score_);
             PAL_INFO(LOG_TAG, "UV Second Stage Detected");
         } else if (bytes_processed_ >= buffer_end_ - buffer_start_) {
             detection_state_ = USER_VERIFICATION_REJECT;
+            vui_intf_->SetSecondStageDetLevels(stream_handle_,
+                engine_type_, det_conf_score_);
             PAL_INFO(LOG_TAG, "UV Second Stage Rejected");
         }
-        det_conf_score_ = (int32_t)result_cfg_ptr->final_user_score;
-        vui_intf_->SetSecondStageDetLevels(stream_handle_,
-            engine_type_, det_conf_score_);
         PAL_INFO(LOG_TAG, "UV second stage conf level %d", det_conf_score_);
     }
 
diff --git a/utils/src/CustomInterface.cpp b/utils/src/CustomInterface.cpp
index 2e26510..270e96f 100644
--- a/utils/src/CustomInterface.cpp
+++ b/utils/src/CustomInterface.cpp
@@ -461,8 +461,18 @@
                                               listen_model_indicator_enum type,
                                               uint32_t level) {
 
+    bool sec_det_level_exist = false;
+
     if (sm_info_map_.find(s) != sm_info_map_.end() && sm_info_map_[s]) {
-        sm_info_map_[s]->sec_det_level.push_back(std::make_pair(type, level));
+        for (auto &iter: sm_info_map_[s]->sec_det_level) {
+            if (iter.first == type) {
+                iter.second = level;
+                sec_det_level_exist = true;
+                break;
+            }
+        }
+        if (!sec_det_level_exist)
+            sm_info_map_[s]->sec_det_level.push_back(std::make_pair(type, level));
     } else {
         PAL_ERR(LOG_TAG, "Stream not registered to interface");
     }
@@ -1658,7 +1668,7 @@
                             sm_info->info->GetConfLevelsSize(), j);
 
                     PAL_INFO(LOG_TAG, "First stage KW Conf levels[%d]-%d",
-                        j, sm_info->info->GetDetConfLevels()[j])
+                        j, sm_info->info->GetDetConfLevels()[j]);
 
                     num_user_levels =
                         conf_levels_v2->conf_levels[i].kw_levels[j].num_user_levels;
@@ -1673,7 +1683,7 @@
                                 sm_info->info->GetConfLevelsSize(), user_id);
 
                         PAL_INFO(LOG_TAG, "First stage User Conf levels[%d]-%d",
-                            k, sm_info->info->GetDetConfLevels()[user_id])
+                            k, sm_info->info->GetDetConfLevels()[user_id]);
                     }
                 }
             } else if (conf_levels_v2->conf_levels[i].sm_id & ST_SM_ID_SVA_S_STAGE_KWD ||
diff --git a/utils/src/SVAInterface.cpp b/utils/src/SVAInterface.cpp
index 3580118..8312f18 100644
--- a/utils/src/SVAInterface.cpp
+++ b/utils/src/SVAInterface.cpp
@@ -380,8 +380,18 @@
                                            listen_model_indicator_enum type,
                                            uint32_t level) {
 
+    bool sec_det_level_exist = false;
+
     if (sm_info_map_.find(s) != sm_info_map_.end() && sm_info_map_[s]) {
-        sm_info_map_[s]->sec_det_level.push_back(std::make_pair(type, level));
+        for (auto &iter: sm_info_map_[s]->sec_det_level) {
+            if (iter.first == type) {
+                iter.second = level;
+                sec_det_level_exist = true;
+                break;
+            }
+        }
+        if (!sec_det_level_exist)
+            sm_info_map_[s]->sec_det_level.push_back(std::make_pair(type, level));
     } else {
         PAL_ERR(LOG_TAG, "Stream not registered to interface");
     }
@@ -1560,7 +1570,7 @@
                             sm_info->info->GetConfLevelsSize(), j);
 
                     PAL_INFO(LOG_TAG, "First stage KW Conf levels[%d]-%d",
-                        j, sm_info->info->GetDetConfLevels()[j])
+                        j, sm_info->info->GetDetConfLevels()[j]);
 
                     num_user_levels =
                         conf_levels_v2->conf_levels[i].kw_levels[j].num_user_levels;
@@ -1575,7 +1585,7 @@
                                 sm_info->info->GetConfLevelsSize(), user_id);
 
                         PAL_INFO(LOG_TAG, "First stage User Conf levels[%d]-%d",
-                            k, sm_info->info->GetDetConfLevels()[user_id])
+                            k, sm_info->info->GetDetConfLevels()[user_id]);
                     }
                 }
             } else if (conf_levels_v2->conf_levels[i].sm_id & ST_SM_ID_SVA_S_STAGE_KWD ||
diff --git a/utils/src/VoiceUIInterface.cpp b/utils/src/VoiceUIInterface.cpp
index 87b76e2..b2ca427 100644
--- a/utils/src/VoiceUIInterface.cpp
+++ b/utils/src/VoiceUIInterface.cpp
@@ -159,6 +159,8 @@
             free(sm_info_map_[s]->wakeup_config);
         if (sm_info_map_[s]->info)
             delete(sm_info_map_[s]->info);
+        sm_info_map_[s]->sec_threshold.clear();
+        sm_info_map_[s]->sec_det_level.clear();
         free(sm_info_map_[s]);
         sm_info_map_.erase(iter);
     } else {
