Readd missing if
Merge pull request #422 from LeovR/patch-2

Readd missing if