diff --git a/cellular_capability_universal.cc b/cellular_capability_universal.cc
index aa1dc77..2c674a8 100644
--- a/cellular_capability_universal.cc
+++ b/cellular_capability_universal.cc
@@ -1526,18 +1526,25 @@
 
   // Unlock required and SimLock
   uint32 unlock_required;  // This is really of type MMModemLock
+  bool lock_status_changed = false;
   if (DBusProperties::GetUint32(properties,
                                 MM_MODEM_PROPERTY_UNLOCKREQUIRED,
-                                &unlock_required))
+                                &unlock_required)) {
     OnLockTypeChanged(static_cast<MMModemLock>(unlock_required));
+    lock_status_changed = true;
+  }
 
   // Unlock retries
   it = properties.find(MM_MODEM_PROPERTY_UNLOCKRETRIES);
   if (it != properties.end()) {
     LockRetryData lock_retries = it->second.operator LockRetryData();
     OnLockRetriesChanged(lock_retries);
+    lock_status_changed = true;
   }
 
+  if (lock_status_changed)
+    OnSimLockStatusChanged();
+
   if (DBusProperties::GetUint32(properties,
                                 MM_MODEM_PROPERTY_ACCESSTECHNOLOGIES,
                                 &uint_value))
@@ -1753,20 +1760,18 @@
     const LockRetryData &lock_retries) {
   SLOG(Cellular, 2) << __func__;
 
-  // Look for the retries left for the current lock. If the SIM
-  // is not locked, then pick the first available value.
-  LockRetryData::const_iterator it;
-  if (sim_lock_status_.lock_type != MM_MODEM_LOCK_NONE &&
-      sim_lock_status_.lock_type != MM_MODEM_LOCK_UNKNOWN)
-      it = lock_retries.find(sim_lock_status_.lock_type);
-  else
+  // Look for the retries left for the current lock. Try the obtain the count
+  // that matches the current count. If no count for the current lock is
+  // available, report the first one in the dictionary.
+  LockRetryData::const_iterator it =
+      lock_retries.find(sim_lock_status_.lock_type);
+  if (it == lock_retries.end())
       it = lock_retries.begin();
   if (it != lock_retries.end())
     sim_lock_status_.retries_left = it->second;
   else
     // Unknown, use 999
     sim_lock_status_.retries_left = 999;
-  OnSimLockStatusChanged();
 }
 
 void CellularCapabilityUniversal::OnLockTypeChanged(
@@ -1782,7 +1787,6 @@
       lock_type != MM_MODEM_LOCK_UNKNOWN &&
       !sim_lock_status_.enabled)
     sim_lock_status_.enabled = true;
-  OnSimLockStatusChanged();
 }
 
 void CellularCapabilityUniversal::OnSimLockStatusChanged() {
diff --git a/cellular_capability_universal_unittest.cc b/cellular_capability_universal_unittest.cc
index 825a3b3..d4fb59a 100644
--- a/cellular_capability_universal_unittest.cc
+++ b/cellular_capability_universal_unittest.cc
@@ -2115,12 +2115,13 @@
   EXPECT_EQ(kDefaultRetries, capability_->sim_lock_status_.retries_left);
 
   data[MM_MODEM_LOCK_SIM_PIN] = 3;
+  data[MM_MODEM_LOCK_SIM_PUK] = 10;
   capability_->OnLockRetriesChanged(data);
   EXPECT_EQ(3, capability_->sim_lock_status_.retries_left);
 
-  capability_->sim_lock_status_.lock_type = MM_MODEM_LOCK_SIM_PIN2;
+  capability_->sim_lock_status_.lock_type = MM_MODEM_LOCK_SIM_PUK;
   capability_->OnLockRetriesChanged(data);
-  EXPECT_EQ(kDefaultRetries, capability_->sim_lock_status_.retries_left);
+  EXPECT_EQ(10, capability_->sim_lock_status_.retries_left);
 
   capability_->sim_lock_status_.lock_type = MM_MODEM_LOCK_SIM_PIN;
   capability_->OnLockRetriesChanged(data);
@@ -2193,7 +2194,7 @@
   EXPECT_EQ(2, capability_->sim_lock_status_.retries_left);
 
   // Unlock retries changed with a value that doesn't match the current
-  // lock type. Default to 999.
+  // lock type. Default to whatever count is available.
   retry_data.clear();
   retry_data[MM_MODEM_LOCK_SIM_PIN2] = 2;
   variant.clear();
@@ -2202,7 +2203,7 @@
   changed[MM_MODEM_PROPERTY_UNLOCKRETRIES] = variant;
   capability_->OnModemPropertiesChanged(changed, invalidated);
   EXPECT_EQ(MM_MODEM_LOCK_SIM_PIN, capability_->sim_lock_status_.lock_type);
-  EXPECT_EQ(999, capability_->sim_lock_status_.retries_left);
+  EXPECT_EQ(2, capability_->sim_lock_status_.retries_left);
 }
 
 }  // namespace shill
