sort mogration fix