fixed some things for minimization