Major fix with relays

The previous version would break everything.

Signed-off-by: Scott Lerner <scottphiliplerner@gmail.com>