fix some error for new version of elastic