Fixed more places where environment may not be set for repos