fixed sort by dist