Sort fixes: support for repeated trials.