bugfix for adding data to elasticsearch