more fixes to reconnect logic