Finished work on auto-reconnect