Some fixes to make the feature sort verify.