Fixed race condition in demo.
Merge pull request #9 from jdevuyst/master

Fixed race condition in demo.