Fix Crash on assertion failures

Also: Allow infinite timeouts
Merge pull request #4 from berikv/patch-3

Fix Crash on assertion failures