Try fixing race condition for parallel streams