fixes to elasticsearch