relay: fix some small issues and compiling as well