Fix tests broken by setenv