Adjusted for change to generic factories.