fix bug in invalid slice