Fix reconnect behavior