fixing issues with relay