bugfix in slice_copy