change default index for min/max to be a valid index
1 file changed