debug index problem