next attempt to fix the race in wait_some