Fix for issue #84: race condition in test

Details in issue #84