fixed sorting with motion