stratified sampling bug fixed