missed endif from merge