fix bug with resoreconnection