Fixed a valgrind error.