fixed case when max = min