Fixed typo and #ifdef to #endif