fixing BR #302 - client crash on disconnect