Fixed query retrying, and applied to admin page.