fixing valgrind error because of uninitialized struct members