fix setOptions, add customProvider