misindex bugfix from Sarah