diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AbstractServiceDependencyTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AbstractServiceDependencyTest.java
index c75c5a0..676e19e 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AbstractServiceDependencyTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AbstractServiceDependencyTest.java
@@ -23,8 +23,8 @@
 import static org.ops4j.pax.exam.CoreOptions.provision;
 import junit.framework.Assert;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -50,8 +50,17 @@
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
-       Component sp = m.createComponent().setImplementation(new ServiceProvider(e)).setInterface(ServiceAbstract.class.getName(), null);
-       Component sc = m.createComponent().setImplementation(new ServiceConsumer(e)).add(m.createServiceDependency().setService(ServiceAbstract.class).setRequired(true).setCallbacks("bind", "unbind"));
+       Component sp = m.createComponent()
+           .setInterface(ServiceAbstract.class.getName(), null)
+           .setImplementation(new ServiceProvider(e))
+           ;
+       Component sc = m.createComponent()
+           .setImplementation(new ServiceConsumer(e))
+           .add(m.createServiceDependency()
+               .setService(ServiceAbstract.class)
+               .setRequired(true)
+               .setCallbacks("bind", "unbind")
+               );
        m.add(sp);
        m.add(sc);
        m.remove(sp);
@@ -105,6 +114,7 @@
        }
 
        public void unbind(ServiceAbstract service) {
+           System.out.println("UNBINDDDDDDDDDDDDDDDDDDDDDDDDDDD");
            Assert.assertEquals(m_service, service);
            m_ensure.step(6);
        }
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/DynamicProxyAspectTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/DynamicProxyAspectTest.java
index 3488462..bced730 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/DynamicProxyAspectTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/DynamicProxyAspectTest.java
@@ -28,8 +28,8 @@
 
 import junit.framework.Assert;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -92,6 +92,14 @@
         
         // make sure the proxy has been called twice
         Assert.assertEquals("Proxy should have been invoked this many times.", 2, DynamicProxyHandler.getCounter());
+        
+        try {
+            Thread.sleep(2000);
+        }
+        catch (InterruptedException e1) {
+            // TODO Auto-generated catch block
+            e1.printStackTrace();
+        }
     }
     
     static interface ServiceInterface {
@@ -158,6 +166,7 @@
         }
 
         public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+            System.out.println("IIIIIIINVOKE--------------------------" + method.getName());
             if (m_service == null) {
                 Assert.fail("No service was injected into dynamic proxy handler " + m_label);
             }
@@ -165,7 +174,12 @@
             if (m == null) {
                 Assert.fail("No method " + method.getName() + " was found in instance " + m_service + " in dynamic proxy handler " + m_label);
             }
-            m_counter++;
+            if (method.getName().equals("invoke")) {
+                // only count methods called 'invoke' because those are actually the ones
+                // both interfaces implement (and the dynamic proxy might be invoked for
+                // other methods, such as toString() as well)
+                m_counter++;
+            }
             return m.invoke(m_service, args);
         }
         
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/ServiceDependencyComponentLifeCycleTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/ServiceDependencyComponentLifeCycleTest.java
index b8c96e3..53bc3b1 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/ServiceDependencyComponentLifeCycleTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/ServiceDependencyComponentLifeCycleTest.java
@@ -102,7 +102,9 @@
         
         e.step(11);
         
-        // remove the service again
+        // remove the service again, the component still has an instance bound
+        // dependency on it, so stop() should be invoked, but the component
+        // should not be destroyed
         m.remove(component2);
         e.step(15);
         Assert.assertNull("service should no longer be available", st.getService());
@@ -116,8 +118,8 @@
         private final Ensure m_ensure;
         private final Ensure.Steps m_initSteps = new Ensure.Steps(1, 5);
         private final Ensure.Steps m_startSteps = new Ensure.Steps(2, 6, 8, 16);
-        private final Ensure.Steps m_stopSteps = new Ensure.Steps(3, 7, 17, 18);
-        private final Ensure.Steps m_destroySteps = new Ensure.Steps(4, 14);
+        private final Ensure.Steps m_stopSteps = new Ensure.Steps(3, 7, 12, 17);
+        private final Ensure.Steps m_destroySteps = new Ensure.Steps(4, 18);
 
         public MyComponent(Ensure e) {
             m_ensure = e;
