fix race condition in result collector