restores term env to avoid disaster, and removes echo