Fix tests caused by environment weirdness