fix check for 0 || non-zero (cherry picked from commit 5289a55ba055d0ad201fd6371e311ab0c6e74438)
fix check for 0 || non-zero
(cherry picked from commit 5289a55ba055d0ad201fd6371e311ab0c6e74438)

timaschew/cogent