fixed min error