Add parenthesis around conditional filters.

If the issue still occurs, refer to How to troubleshoot incorrect query results.