fixed a bug about background query #846