The data store should be allocated on the stack
Fix the all zero case
Fix the size estimation of data