add missing #endif from last patch