made the reconnect work properly