Trying to fix the addTypesToIndex stage