CMS-3509 Refactoring for better osgi migration. Fixed a mistake.