fix race case