fix ensureIndexes with options