Improve SetRdGateway().