Fixed global leak; refs #30