Revert "missing "endif""

This reverts commit 92b65de70cbb9cd5c3f184cf2e8497166ec2b6e4.