Fix a bug with endOnly restrictions and inertia