Revert "missing endif"

This reverts commit cbf6ff098a0f0327663eb3f5439c40b07e02361a.