improve index exception handling