error in the min is fixed