Make it work in OSGi