Minor fixes to remove valgrind warning messages.