Fixes bug in the wait logic

Fixes a bug in the wait logic where it was possible for a wait of
undefined to be set, thus timing out instantly.
Bump 0.0.7