Fixing implementation of logic boolean operators