Fixed memory error
Merge pull request #48 from chrisquince/master

Fixed memory error