Fix mismatched ENDIF