Fix racy unit tests, discovered by Jenkins
Merge pull request #18 from tribal-tec/master

Fix racy unit tests, discovered by Jenkins