Bugfix: make operations synchronized