update min with bug fix