Fixed Web Socket implementation