fix issue when ws is empty