replacing fix that was overwritten in buildQuery