more Relay implementation bug fixes