Fix issue with call to the slice function