Bug fix for a potential memory leak
Merge pull request #63 from robwagstaff1984/bugfix

Bug fix for a potential memory leak