Fix indentation error leading compare_links to only look at first bidirectional link
Clear pexpect buffer before attempting to disconnect.

Sometimes the buffer was not cleared and this would lead to longer disconnect times