fixing sample generation
fixing rate sample generation
Merge branch '2-4-stable'