Fixed bug in getRelay