fix errors with elasticsearch when saving annotations