another attempt to fix threading issues in test