fixed bug caused by uninitialized slice