Actually fixed it this time I'm pretty sure. One weird thing though: sometimes get_trajectory returns positions outside of the range of the table