fix bug with lost client