Fixed uninitialised variable warning in valgrind