Fix some (relatively minor) memory leaks...