Fix AttributeError when explicitly specifying wait type ...

and add appropriate regression tests. (fixes #4)

Also added a test for stop type for good measure.