fix a bug in relay.coffee