fix bug slice based and frame based