Patched up some (obvious) memory leaks