Fixed the minimizing issues