Do we need the above two calls to be executed atomically?