Fixing boolean operators