fix bug with sending ws message on no ready state