fixes #2531
Merge pull request #2992 from gurbuzali/and-predicate-issue2531

fixes #2531