Fix test_stat issue