fix random from elastic