prevent infinite loop if sampling range min==max