fixed sorting in market function (hotfix)