Fix a misplaced endif
[skip ci]