Fixed valgrind uninitialised value message while receiving