fixed the motion sampling.