Fixed bug in the relays