Fixed trajectory rejection/sampling bug.