fixed bad endif tag