Fixed issue with as_slice