fixing end-if

removing an unnecessary endif on line 56