fixed DynamicProxy so that it works with interfaces