fix missing endif