rebase: replace incorrect logical negation by correct bitwise one