fix query formation
Merge branch 'roccajoseph'