bugfix to minimize.