Fix class key being used in object provider.