Fix to slicing and logging