Add mutexes for RPC stuff