hah, valgrind helped catch a leak