partially corrected bug with print_stats (nb_level not initialized)