bug fixes on stratification phase.