bug fix for ES version