fix elasticsearch bug