Replace critical section with atomic in mba setup

refs #126