updated exception checking for indexes