locking around transaction calls to ensure client integrity