Fix typecasts in WJLSocket