fix bug in ws type