fix allow none in rpc