Fix a wrong condition
Merge pull request #6884 from chinhodado/patch-4

Fix a wrong condition