Fix logic operators

Fixes #45