Test environment fixes