adapt env variables to current state