fixing ws bug