Add missing "endif"