Fix a typo and add a NDEBUG macro to cope with gcc compiler.