Misplaced #endif corrected