adding missing #endif to terminate #ifdef