Added fix for minimization