Fixed memory leak; now something else is broken.