fixed terminal handling for pluto