Fixed wrong initial value of the min