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

fixes #2531