Fixed the minimizing and reducing process.
Fixed minimization