Fixing broken end / endif.