fix bug when slice has default attributes