fix slice behavior