Fixed valgrind error due to unitialized buffer