concurrency bugfix, added long running unit test to detetct concurrency problems