small fix 1
ordered race condition
more fixes