bug fix - preview does not take into account query changes