Fixes valgrind warnings about uninitialized value used for comparison