re-add missing endif