added query re-run for slower connections