Fixed OSGi based detection.