Start data types with d1 instead of d0; otherwise the case when datasize=1 is incorrect.