fixed ws handler