bugfix: eliminate access race condition by making update operations atomic