Fix randomly failing tests
Merge pull request #398 from magopian/fix-randomly-failing-tests

Fix randomly failing tests