Setting box: fix race condition