index bug fixes