websockets.php minor bugfixes