Fixing missing #endif's after merge