fixed bug, handling wss connections