Fix possible wrong AND in comparison
Merge pull request #501 from naoliv/pull24

Fix possible wrong AND in comparison