fixing option handling in index()