improved websockets support