concurrency and state fixes