Fix some stuff in elasticsearch