Fix minimization dependency injection issues