fix bug in zero min