Rework of the reconnections

Reconnect now seems to work flawlessly.