Try setting the pty to raw mode.