Keep relay version across reconnect

Fix battling bug and Fix #839