fixed up environment stuff.