Fix some startup valgrind warnings