fixed some slice issues