environment should be set first in bootstrap