thread race condition fixed
thread race condition fixed


Former-commit-id: 7e5d59c9c238d76e5c375d58410fdb85e536021f
roryk/transrate,Blahah/transrate,cboursnell/transrate,cboursnell/transrate,roryk/transrate,cboursnell/transrate,Blahah/transrate,roryk/transrate,Blahah/transrate