Moved min subtraction