handle reconnect better