fixed a bug in Slice