diff --git a/apachesolr_access/apachesolr_access.module b/apachesolr_access/apachesolr_access.module
index 3574179..1a67d7d 100644
--- a/apachesolr_access/apachesolr_access.module
+++ b/apachesolr_access/apachesolr_access.module
@@ -122,7 +122,7 @@ function apachesolr_access_form_alter(&$form, $form_state, $form_id) {
 function apachesolr_access_rebuild_nodeaccess(&$form, $form_state) {
   drupal_set_message(t('Solr search index will be rebuilt.'));
   // Clear last updated
-  apachesolr_index_set_last_updated();
+  apachesolr_set_last_index_updated(apachesolr_default_environment());
 }
 
 function apachesolr_access_enable() {
