Fixed some parts of code that are reported as 'use-of-uninitialized-value' by MemorySanitizer (using clang++-16)