relay bugfix