Fixed #endif placement