trying to fix the index problem