Fixed bug in pexpect interface.