relay bug fix