fix sample publication query