fix for min == max