Use then to fix flakey tests
Merge pull request #131 from muffinresearch/fix-flakey-tests

Use then to fix flakey tests