endif fix