fixed a few small timing bugs in WebSocket tests