fixed bug  in EHC for multiple iterations