fix unitialized variable warning
fix packing