fix potential buffer oob error
0.0.4