Fixed error: NullPointerError during bean creation, when using lib in third-party projects.