Ed: add asserts on shift_stop_times
Ed: fix shifting