improved reconnect