Fix problems with OSGi bundle