fix out of index