Fix memory leak and script timeout.
Merge pull request #2 from anaconda/patch-1

Fix memory leak and script timeout.