Fix bug in plot_orbit