logic on -min

fixed logic on -min