fix issue when quality data was still considered when the query was
closed