fix nested index