nested bool query fixes