Add lock in remote_driver handlers