Fix bug with toggle/hide SQL on queries#index