backend query bugfix