Fixed test_sampling