Fixed a bug where the custom provider factory wasn't being set.