Fixed bug with slice method where end index is omitted