fixed reordering bug in names2sex