fixed the minimizer error