fix reconnect logic
0.3.8