Fix Spring ObjectFactory implementation