Fix chat index bug