Some fixes for new statistics

Fix enable_debug() problem.