Slice attributes are strings. Cast to int before calculating limits.