Fixes to parallel learning and sort methods