diff --git a/targets/build_oai.bash b/targets/build_oai.bash
index 9e28232e9013d2ac4345eac71d91bb876146552a..f926e8089badf0a1a05f38128486e004694a0561 100755
--- a/targets/build_oai.bash
+++ b/targets/build_oai.bash
@@ -601,17 +601,17 @@ build_hss(){
     if [ $DISABLE_CHECK_INSTALLED_SOFTWARE -eq 0 ]; then 
         echo_info "4. check the required packages for HSS"
         check_install_hss_software
-    else
-        echo_info "6. Not checking the required packages for HSS"
-    fi
-    
-    if [ $OAI_CLEAN -eq 1 ]; then
-        check_install_freediamter
-    else 
-        if [ ! -d /usr/local/etc/freeDiameter ]; then
+        if [ $OAI_CLEAN -eq 1 ]; then
             check_install_freediamter
+        else 
+            if [ ! -d /usr/local/etc/freeDiameter ]; then
+                check_install_freediamter
+            fi
         fi
+    else
+        echo_info "4. Not checking the required packages for HSS"
     fi
+    
   
 ######################################
 # compile HSS                        #