fix infinite reconnects