Fix reconnect bug that would mean it would only ever reconnect once.