fix expect behavior
Merge pull request #171 from petercable/expect_fix

fix expect behavior