fixed typo end vs. endif