Fixed error with unequal length trajectories

It wasn't giving them -1