diff --git a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
index d9303e7..80ef6fa 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
@@ -72,7 +72,9 @@
         // extends BundleImpl and it doesn't have an archive.
         if (m_archive != null)
         {
-            addModule(createModule());
+            IModule module = createModule();
+            addModule(module);
+            m_felix.getResolverState().addModule(module);
         }
     }
 
@@ -85,14 +87,14 @@
         return m_felix;
     }
 
-    synchronized void refresh(FelixResolverState state) throws Exception
+    synchronized void refresh() throws Exception
     {
         // We are refreshing the bundle. First, we must remove all existing
         // modules from the resolver state and close them. Closing the modules
         // is important, since we will likely be deleting their associated files.
         for (int i = 0; i < m_modules.length; i++)
         {
-            state.removeModule(m_modules[i]);
+            m_felix.getResolverState().removeModule(m_modules[i]);
             ((ModuleImpl) m_modules[i]).close();
         }
 
@@ -104,7 +106,7 @@
         m_modules = new IModule[0];
         final IModule module = createModule();
         addModule(module);
-        state.addModule(module);
+        m_felix.getResolverState().addModule(module);
         m_state = Bundle.INSTALLED;
         m_stale = false;
         m_cachedHeaders.clear();
@@ -890,11 +892,14 @@
         return used;
     }
 
-    synchronized void revise(String location, InputStream is) throws Exception
+    synchronized void revise(String location, InputStream is)
+        throws Exception
     {
         // This operation will increase the revision count for the bundle.
         m_archive.revise(location, is);
-        addModule(createModule());
+        IModule module = createModule();
+        addModule(module);
+        m_felix.addModule(module);
     }
 
     synchronized boolean rollbackRevise() throws Exception
@@ -923,7 +928,7 @@
         m_modules = dest;
     }
 
-    private synchronized IModule createModule() throws Exception
+    private IModule createModule() throws Exception
     {
         // Get and parse the manifest from the most recent revision to
         // create an associated module for it.
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 0c931fb..32050f4 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -315,6 +315,11 @@
         return m_felixResolver;
     }
 
+    FelixResolverState getResolverState()
+    {
+        return m_resolverState;
+    }
+
     URLStreamHandler getBundleStreamHandler()
     {
         return m_bundleStreamHandler;
@@ -1568,9 +1573,9 @@
 
             try
             {
+// REFACTOR - This adds the module to the resolver state, but should we do the
+//            security check first?
                 bundle.revise(updateLocation, is);
-// REFACTOR - Are we adding this to the resolver state too early?
-                m_resolverState.addModule(bundle.getCurrentModule());
 
                 // Create a module for the new revision; the revision is
                 // base zero, so subtract one from the revision count to
@@ -2051,10 +2056,6 @@
 // TODO: REFACTOR - REFRESH RESOLVER STATE.
 //                    m_factory.refreshModule(m_sbi.getCurrentModule());
                 }
-
-                // Get the bundle's module and add it to the resolver state.
-                IModule module = bundle.getCurrentModule();
-                m_resolverState.addModule(module);
             }
             catch (Throwable ex)
             {
@@ -3099,7 +3100,7 @@
             try
             {
                 // Reset the bundle object and fire UNRESOLVED event.
-                ((BundleImpl) bundle).refresh(m_resolverState);
+                ((BundleImpl) bundle).refresh();
                 fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
             }
             catch (Exception ex)
