Merge "Fix valgrind errors."