bugfix for relay.php