more environment fixes