fixed sorting thing.. hopefully