Fix for memory issues crashing (hopefully)
Merge pull request #1 from brynjar/master

Fix for memory issues crashing (hopefully)