diff --git a/includes/smart_ip.admin.inc b/includes/smart_ip.admin.inc
index ec21a53..a48494a 100644
--- a/includes/smart_ip.admin.inc
+++ b/includes/smart_ip.admin.inc
@@ -347,7 +347,7 @@ function smart_ip_admin_settings_submit($form, &$form_state) {
   if ($location) {
     drupal_set_message(t('Using @type IP: %ip / Country: %country / Region: %region / City: %city / Postal code: %zip / Longitude: %long / Latitude: %lat', array(
       '@type'    => $form_state['values']['smart_ip_debug'] ? 'debug' : 'actual',
-      '%ip'      => $ip, 
+      '%ip'      => $location['ip'],
       '%country' => $location['country'],
       '%region'  => $location['region'],
       '%city'    => $location['city'],
@@ -384,6 +384,6 @@ function smart_ip_admin_settings_submit($form, &$form_state) {
     }
   }
   else {
-    drupal_set_message(t('IP Address @ip is not assigned to any location.', array('@ip' => $ip)));
+    drupal_set_message(t('IP Address @ip is not assigned to any location.', array('@ip' => ip_address())));
   }
 }
\ No newline at end of file

