fix Histogram sort
add lookahead buffer to OrderedMultiGeneratorWrapper