fixed problem where query was always collapsed

Merged Dr. Carsten Kemena requested to merge develop into master

Merge request reports