Fixed slicing error