Add missing "endif"

This was removed in a pick and needs re added to build