Change slice ending behavior to match python