fix race in test