Fixed regression bugs for enrichment
Fixed regression bugs after the refactoring