reconnect on query fail