fixed panic in relay.go